const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_construction_licence_alone', {
    id: {
      autoIncrement: true,
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true,
      comment: "唯一标识"
    },
    messageId: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "原信息ID",
      field: 'message_id'
    },
    itemNum: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "事项编号",
      field: 'item_num'
    },
    singleProjNum: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "单体编号",
      field: 'single_proj_num'
    },
    singleProjName: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "单体名称",
      field: 'single_proj_name'
    },
    prjNum: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "项目编号",
      field: 'prj_num'
    },
    prjName: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "项目名称",
      field: 'prj_name'
    },
    prjType: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目类型",
      field: 'prj_type'
    },
    singlePrjSize: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "单体建设规模",
      field: 'single_prj_size'
    },
    bulidArea: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "建筑面积",
      field: 'bulid_area'
    },
    buildLength: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "建筑长度",
      field: 'build_length'
    },
    upperBulidArea: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地上建筑面积",
      field: 'upper_bulid_area'
    },
    upperBulidLength: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地上建筑长度",
      field: 'upper_bulid_length'
    },
    underBulidArea: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地下建筑面积",
      field: 'under_bulid_area'
    },
    underBulidLength: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地下建筑长度",
      field: 'under_bulid_length'
    },
    upperFloors: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地上层数",
      field: 'upper_floors'
    },
    underFloors: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "地下层数",
      field: 'under_floors'
    },
    sCreatetime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "单体高度",
      field: 's_createtime'
    },
    sLastUpdatetime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "计划开工日期",
      field: 's_last_updatetime'
    },
    structSysCode: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "结构系统代码",
      field: 'struct_sys_code'
    },
    createTime: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "创建时间",
      field: 'create_time'
    },
    guihuaxukezhenghao: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "规划许可证号"
    },
    baojianjindu: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "保监进度"
    },
    shifutiqianjierugongcheng: {
      type: DataTypes.STRING(300),
      allowNull: true,
      comment: "是否提前介入工程"
    },
    isDeleted: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "是否删除",
      field: 'is_deleted'
    },
    createdUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "创建人",
      field: 'created_user'
    },
    createdTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "本系统创建时间",
      field: 'created_time'
    },
    updatedUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "修改人",
      field: 'updated_user'
    },
    updatedTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间",
      field: 'updated_time'
    }
  }, {
    sequelize,
    tableName: 'base_construction_licence_alone',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
